<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改线路')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-line-edit" th:object="${pubLine}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">线路编号：</label>
                <div class="col-sm-8">
                    <input name="no" th:field="*{no}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">线路长度：</label>
                <div class="col-sm-8">
                    <input name="length" th:field="*{length}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">非直线系数：</label>
                <div class="col-sm-8">
                    <input name="nonLinearCoefficient" th:field="*{nonLinearCoefficient}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">全程票价：</label>
                <div class="col-sm-8">
                    <input name="fullFare" th:field="*{fullFare}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">票制ID：</label>
                <div class="col-sm-8">
                    <input name="fareCalculateMethodId" th:field="*{fareCalculateMethodId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">有效期起始：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="validityDate" th:value="${#dates.format(pubLine.validityDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">有效期截止：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="expiryDate" th:value="${#dates.format(pubLine.expiryDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否分冬夏令时：</label>
                <div class="col-sm-8">
                    <select name="isDst" class="form-control m-b" th:with="type=${@dict.getType('true_false')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isDst}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">首班时间 (格式:hh:mm)：</label>
                <div class="col-sm-8">
                    <input name="firstVehicleHour" th:field="*{firstVehicleHour}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">夏令时首班车时间 (格式:hh:mm)：</label>
                <div class="col-sm-8">
                    <input name="dstFirstVehicleHour" th:field="*{dstFirstVehicleHour}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">末班车时间 (格式:hh:mm)：</label>
                <div class="col-sm-8">
                    <input name="finalVehicleHour" th:field="*{finalVehicleHour}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">夏令时末班车时间 (格式:hh:mm)：</label>
                <div class="col-sm-8">
                    <input name="dstFinalVehicleHour" th:field="*{dstFinalVehicleHour}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">线路是否审批：</label>
                <div class="col-sm-8">
                    <select name="isApprove" class="form-control m-b" th:with="type=${@dict.getType('true_false')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isApprove}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">线路批复时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="approvalDate" th:value="${#dates.format(pubLine.approvalDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">线路首站站点：</label>
                <div class="col-sm-8">
                    <input name="firstStationId" th:field="*{firstStationId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">线路末站站点：</label>
                <div class="col-sm-8">
                    <input name="latestStationId" th:field="*{latestStationId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">公里数：</label>
                <div class="col-sm-8">
                    <input name="kilometres" th:field="*{kilometres}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">站位走向 (上行和下行)：</label>
                <div class="col-sm-8">
                    <input name="direction" th:field="*{direction}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">配置车辆数量：</label>
                <div class="col-sm-8">
                    <input name="numberOfVehicles" th:field="*{numberOfVehicles}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属公司ID：</label>
                <div class="col-sm-8">
                    <input name="ownerCompanyId" th:field="*{ownerCompanyId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">登记日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="registeredDate" th:value="${#dates.format(pubLine.registeredDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">审批状态：</label>
                <div class="col-sm-8">
                    <input name="approvalState" th:field="*{approvalState}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">审批人ID：</label>
                <div class="col-sm-8">
                    <input name="approvalPersonId" th:field="*{approvalPersonId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="createdAt" th:value="${#dates.format(pubLine.createdAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">起始停车场ID：</label>
                <div class="col-sm-8">
                    <input name="startParkingLotId" th:field="*{startParkingLotId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">终止停车场ID：</label>
                <div class="col-sm-8">
                    <input name="endParkingLotId" th:field="*{endParkingLotId}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "bussiness/line";
        $("#form-line-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-line-edit').serialize());
            }
        }

        $("input[name='validityDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='expiryDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='approvalDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='registeredDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='createdAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>